package com.zdkj.subway.stm.fegin;

import com.zdkj.common.core.constant.SecurityConstants;
import com.zdkj.common.core.constant.ServiceNameConstants;
import com.zdkj.common.core.util.R;
import com.zdkj.subway.stm.dto.in.SwMessageDTO;
import com.zdkj.subway.stm.dto.in.SwStOperateLogDTO;
import com.zdkj.subway.stm.dto.out.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @program: zdkj
 * @description:
 * @author: chen
 * @create: 2020-01-18 16:23
 **/
@FeignClient(contextId = "subwaySupportService", value = ServiceNameConstants.SUPPORT_SERVICE)
public interface SupportService {




    /**
     * 批量插入修改日志
     * @param list
     * @return
     */
    @PostMapping("/swstoperatelog/saveBatch")
    R logSaveBatch(@RequestBody List<SwStOperateLogDTO> list);
    /**
     * 插入删除日志
     * @param list
     * @return
     */
    @PostMapping("/swstoperatelog")
    R logSave(@RequestBody SwStOperateLogDTO list);


    /**
     *
     * @return
     */
    @GetMapping("/swparamstation/dictInner")
    R<List<SwParamStation>> getStationDict(@RequestHeader(SecurityConstants.FROM) String from);

    /**
     *
     * @return
     */
    @PostMapping("/swmessage/inner")
    R saveInner(@RequestBody SwMessageDTO swMessage, @RequestHeader(SecurityConstants.FROM) String from);

    /**
     *
     * @return
     */
    @PostMapping("/swmessage/innerBatch")
    R saveBatchInner(@RequestBody List<SwMessageDTO> swMessage, @RequestHeader(SecurityConstants.FROM) String from);

    /**
     *  获取长周期结算日期列表
     * @param from
     * @return
     */
    @GetMapping("/swpmlongperiodsettlement/findList/{stationCode}/{lineCode}")
    R<SwPmLongPeriodSettlementDTO> getLongPeriodSettlement(@PathVariable("stationCode") String stationCode,@PathVariable("lineCode") String lineCode, @RequestHeader(SecurityConstants.FROM) String from);

    /**
     * 获取主类型票卡数据字典
     * @return
     */
    @GetMapping("/swpmticketcardtype/dictInner")
    R<List<SwPmTicketCardTypeDto>> getCardTypeDict(@RequestHeader(SecurityConstants.FROM) String from);

    /**
     * 获取根据主类型名称获取子类型数据字典
     * @return
     */
    @GetMapping("/swpmticketcardtypeparam/dictInner/{mainEnName}")
    R<List<SwPmTicketCardTypeParamDto>> getCardTypeParamDict(@PathVariable("mainEnName") String mainEnName, @RequestHeader(SecurityConstants.FROM) String from);

    /**
     * 根据字典类型查询字典信息--其他相关数据数据类型参数表(数据类型)
     */
    @GetMapping("/swpmworkotherdatatype/dict")
    R<List<SwPmWorkotherDataTypeDTO>> getDictByType();

    /**
     * 根据字典类型查询字典信息--其他相关数据产生原因参数表(产生原因)
     */
    @GetMapping("/swpmworkotherhappencause/dict")
    R<List<SwPmWorkotherHappenCauseDTO>> getParamByMainType();
}
